package com.wangyg.breadstore.outer;

import com.wangyg.breadstore.model.FlourFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by wangyg6 on 2019/5/20 15:42.
 */
//注意 遇到远程应用有上下文路径的，需要在path中增加。
@FeignClient(value = "flourfactory", path = "/flour_factory" )
public interface ICallFlourFactory {

	@PostMapping("flourFactory")
	public FlourFactory crateFactory(@RequestBody FlourFactory flourFactory);

	@GetMapping("flourFactory")
	public Integer getFlourNum(@RequestParam("factId") Integer factId);

}
